#include<cstdio>
struct employee
{
	char workid[20];
	char name[128];
	bool sex;//1 for men,0 for women
	char id[20];
	double salary;
	char address[128];
	int yy,mm,dd;
};
void init(struct employee &a);
void prin(struct employee &a);
int main()
{
	struct employee emp;
	init(emp);
	prin(emp);
	return 0;
}
void init(struct employee &a)
{
	puts("Please enter the workid");
	gets(a.workid);
	puts("Please enter the name");
	gets(a.name);
	puts("Please enter the sex(1 for man 0 for woman)");
	scanf("%d",&a.sex);
	fflush(stdin);
	puts("Please enter the id");
	gets(a.id);
	puts("Please enter the salary");
	scanf("%lf",&a.salary);
	fflush(stdin);
	puts("Please enter the address");
	gets(a.address);
	puts("Please enter the worked time(yy mm dd)");
	scanf("%d%d%d",&a.yy,&a.mm,&a.dd);
	fflush(stdin);
	return;
}
void prin(struct employee &a)
{
	printf("workid  %s\n",a.workid);
	printf("name    %s\n",a.name);
	printf("sex     ");
	if(a.sex)
	{
		puts("man");
	}
	else
	{
		puts("woman");
	}
	printf("id      %s",a.id);
	printf("salary  %lg\n",a.salary);
	printf("address %s\n",a.address);
	printf("worked time %dyear %dmonth %dday\n",a.yy,a.mm,a.dd);
	return;
}
